@startuml seqTaoBaiDang
skin rose
hide footbox
actor congTy as "Công ty\ntuyển dụng"
boundary companyInterface as ": Company Interface\nClass"
control postController as ": Post Controller\nClass"
entity Post as ": Post\nClass"

autonumber
congTy++
congTy -> companyInterface++: Truy cập trang tạo bài đăng
companyInterface -> companyInterface--: Hiển thị trang tạo bài đăng\nvới thông tin rỗng
congTy -> companyInterface++: Nhập thông tin bài bài đăng
companyInterface -> companyInterface: Kiểm tra thông tin\n bài đăng nhập vào
alt Invalid data
    companyInterface-> companyInterface: Hiển thị thông báo \nthiếu thông tin bài đăng    
else Valid data
    companyInterface-> postController: Gửi yêu cầu tạo bài đăng
    postController-> Post++: Gửi thông tin bài đăng
    Post->Post: Kiểm tra thông tin bài đăng
    alt Invalid data
        Post->postController: Thông báo lỗi 
        postController -> companyInterface: Hiển thị thông báo\nlỗi ra cho người dùng
    else
        Post->Post: Lưu thông tin bài đăng mới
        Post-> postController: Thông báo tạo bài đăng thành công
        postController->companyInterface: Hiển thị thông báo\n"Tạo bài đăng thành công"
        companyInterface->congTy: Thông báo cho công ty tạo bài đăng thành công
    end
end
@enduml