import { FlexTableComponent } from "./../../../../shared/common/FlexTable.component";
import { Component, OnInit } from "@angular/core";
import { FormBuilder, Validators } from "@angular/forms";
import { CustomValidators } from "ng2-validation";
import { BsModalService } from "ngx-bootstrap/modal";

@Component({
  selector: "app-pl-practice-course-enrol",
  templateUrl: "./pl-practice-course-enrol.component.html",
  styleUrls: ["./pl-practice-course-enrol.component.scss"]
})
export class PlPracticeCourseEnrolComponent extends FlexTableComponent
  implements OnInit {
  public query = {
    optr_name: "",
    login_name: "",
    login_pass: ""
  };

  QUERY_URL = "frame/optr/page.htm";
  DELETE_URL = "frame/optr/delete.htm";
  GET_URL = "frame/optr/get.htm";
  ADD_URL = "frame/optr/add.htm";
  EDIT_URL = "frame/optr/edit.htm";

  constructor(public bsModalService: BsModalService, fb: FormBuilder) {
    super();
    // CustomValidators.rangeLength([1, 6])
    this.formModel = fb.group({
      id: [null],
      optr_name: [null],
      login_name: [null],
      login_pass: [null],
      optr_sex: [null],
      optr_role: [null],
      optr_status: [null],
      optr_post: [null],
      optr_desc: [null],
      create_time: [null],
      role_name: [null]
    });
  }

  ngOnInit() {}
}
